{% extends "base.html" %}
{% block title %}分类查看{% endblock %}
{% block navbar %}{{ super() }}{% endblock %}
{% block styles %}{{ super() }}
<style>
    .main-div {
        background: #ffffff none repeat scroll 0 0;
        border-radius: 2px;
        margin: 10px auto 30px;
        max-width: 80%;
        padding: 20px 20px 20px 20px;
    }

    body {
        padding-top: 100px;
    }
</style>
{% endblock %}
{% block content %}
<div class="container">
    <div class="row">
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>
        <div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
            {% include 'flash_message.html' %}
            <table class="table table-hover table-condensed">
                <thead>
                    <tr>
                        <th>大类</th>
                        <th>分类</th>
                    </tr>
                </thead>
                <tbody>
                    {% for subcategory in subcategories %}
                    {% if subcategory[4] %}
                    <tr class="danger" style="display:none;">
                        {% else %}
                    <tr style="background-color:#{{ subcategory[2] }}">
                        {% endif %}
                        <td>{{ subcategory[5] }}</td>
                        <td>{{ subcategory[1] }}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>
    </div>
</div>
{% endblock %}